#pragma once

#include <thread>

#include "util/fs.h"
#include "util/executor.h"
#include "util/thread-executor.h"


class AbcArticleManagerController;
class AbcArticleManager;

class AbcArticleManagerSynchronizer
{
public:
    AbcArticleManagerSynchronizer(AbcArticleManagerController &controller, Executor &executor);
    ~AbcArticleManagerSynchronizer();

    void notifyRepoPushed();

    void afterBookDataDirActivated(const fs::path &dir);

private:
    AbcArticleManagerController &controller_;
    Executor &controllerThread_;
    ThreadExecutor managerThread_;
    AbcArticleManager *manager_ = nullptr;
};
